package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.OperateIntergralVo;
import cn.wolfcode.domain.PayVo;

import cn.wolfcode.domain.RefundVo;
import cn.wolfcode.feign.fallback.PayFeignFallBack;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author LuoRis
 * @date 2021/03/11 15:04
 * @description 支付服务远程调用
 */
@FeignClient(name = "pay-service",fallback = PayFeignFallBack.class)
public interface PayFeignApi {
    /**
     * 在线支付
     * @param payVo
     * @return
     */
    @RequestMapping("/alipay/payOnline")
    Result<String> payOnline(@RequestBody PayVo payVo);

    /**
     * 验签
     * @param params
     * @return
     */
    @RequestMapping("/alipay/rsaCheckV")
    Result<Boolean> rsaCheckV(@RequestParam Map<String, String> params);

    /**
     * 退款
     * @param refundVo
     * @return
     */
    @RequestMapping("/alipay/refund")
    Result<Boolean> refund(@RequestBody RefundVo refundVo);


}
